import {reactive} from 'vue'
import {DialogModel} from '@/type/BastType'
export default function useDialog(){
  const dialog = reactive<DialogModel>({
    title:'',
    width:630,
    height:280,
    visible:false,
    showFooter:true,
    screenFlag:true,
    marginTop:'15vh'
  })
  const onShow=()=>{
    dialog.visible = true
    // 重新加载数据
  }
  const onClose=()=>{
    dialog.visible = false
    // 清空数据
  }
  const onConfirm=()=>{
    dialog.visible = false
  }
  return{
    dialog,
    onClose,
    onConfirm,
    onShow
  }
}